DNA sequences carry important biological information of human bodies, how to compare multiple DNA sequences correctly with privacy preserving is an important problem. To a certain extent, Hamming distance characterizes the similarity between two DNA sequences. Therefore, the privacy preserving Hamming distance computing problem of DNA sequences was researched. First of all, the "0-1 Coding" of the DNA sequence was defined, which codes the DNA sequence with length n to a 0-1 string with length 4n, proving that the Hamming distance of two DNA sequences is a half of the Hamming distance of their "0-1 Coding" strings. Then, with the help of this conclusion, with the Goldwasser-Micali (GM) encryption algorithm taken as main encryption tool, a secure two-party computation protocol for computing the Hamming distance of two DNA sequences was proposed. It was shown that the protocol is both secure and correct under semi-honest attacker model. The proof of security based on a simulator was given. After then, the efficiency of the protocol was analyzed.